package com.qztech.sdk.model.dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import com.qztech.sdk.model.entities.EqChannel;

import java.util.List;

/**
 * @author:zhanghb
 * @date:2019/1/27
 * @email:2573475062@qq.com
 **/
@Dao
public interface EqChannelDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(List<EqChannel> eqChannels);

    @Update
    void update(EqChannel eqChannel);

    @Delete
    void delete(EqChannel eqChannel);

    @Query("DELETE FROM eq_channel where settings_id=:settingId")
    void delete(String settingId);

    @Query("SELECT * FROM eq_channel WHERE settings_id=:settingId")
    List<EqChannel> getEqChannels(String settingId);
}
